DATA    SEGMENT 
STRING  DB 50
	    DB 0 
	    DB 50 DUP('$')
MSG1 DB 'INPUT STRING:$'
MSG2 DB 'OUTPUT STRING:$'
CRLF DB 0DH,0AH,'$'
DATA    ENDS 

CODE    SEGMENT
        ASSUME  CS:CODE ,DS:DATA
START:  MOV     AX,     DATA 
        MOV     DS,     AX

	  LEA	DX,MSG1
	  MOV AH,09H
	  INT 21H

	  LEA	DX,STRING
	  MOV AH,0AH
	  INT 21H

	  LEA SI,STRING+1
	  XOR CX,CX
      MOV     CX,     [SI]     
      LEA     BX,     STRING+2  
ALP:  MOV     AL,     [BX]
      CMP     AL,     '$'             
      JZ      OVER                                              
      CMP     AL,     'a'                      
      JB     NEXT                         
      CMP     AL,     'z'      
      JA      NEXT                   
      SUB     AL,     20H              
      JMP     NEXT 
NEXT:  
      MOV [BX],AL           
	  INC     BX 
      LOOP    ALP   
OVER:
	  LEA DX,CRLF
	  MOV AH,09H 
	  INT 21H

	  LEA DX,MSG2
	  MOV AH,09H 
	  INT 21H 
	  LEA DX,STRING+2 
	  MOV AH,09H
	  INT 21H
      MOV AH,4CH
      INT 21H        
CODE    ENDS
END     START




